(function($, window, document, undefined) {
  
  /* 轮播图 */
  new Swiper('.cruise-flash', {
    loop: true,
    autoplay: {
      disableOnInteraction: false
    },
    pagination: {
      el: '.cruise-flash .swiper-pagination'
    },
    navigation: {
      nextEl: '.cruise-flash .swiper-button-next',
      prevEl: '.cruise-flash .swiper-button-prev',
    }
  })
  /* / 轮播图 */

  // 头部快捷导航
  var postion = []
    
  $('#_1, #_2, #_3').each(function(index, item) {
    postion.push(item.offsetTop + 130)
  })
  
  $('.vip-link-item').on('click', function(e) {
    e.preventDefault()

    var $el = $(e.target)

    if (!$el.is('.vip-link-item')) {
      $el = $el.parents('.vip-link-item')
    }
    
    $('html, body').animate({
      scrollTop: postion[$el.index()]
    })

  })

})(jQuery, window, document)